package com.chengyu.core.service.file.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import com.chengyu.core.domain.CommonConstant;
import com.chengyu.core.domain.enums.RedisEnums;
import com.chengyu.core.domain.result.GoodsCateResult;
import com.chengyu.core.exception.ServiceException;
import com.chengyu.core.mapper.FileInfoMapper;
import com.chengyu.core.mapper.PmsGoodsCateMapper;
import com.chengyu.core.mapper.PmsGoodsRelateMapper;
import com.chengyu.core.model.FileInfo;
import com.chengyu.core.model.PmsGoodsCate;
import com.chengyu.core.model.PmsGoodsCateExample;
import com.chengyu.core.service.file.FileInfoService;
import com.chengyu.core.service.goods.GoodsCateService;
import com.chengyu.core.util.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author LeGreen
 * @title 商品分类
 * @date 2022/4/25
 */
@Service
public class FileInfoServiceImpl implements FileInfoService {

    @Autowired
    private FileInfoMapper fileInfoMapper;

    @Override
    @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
    public Integer add(FileInfo fileInfo) {
        int insert = fileInfoMapper.insert(fileInfo);
        return insert;
    }


}